<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>找回密码-{$GLOBALS['S']['title']}</title>
<link href="{$GLOBALS['skin']}style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var site_dir="{$GLOBALS['WWW']}";
</script>
{include="js.html"}
<script src="{$GLOBALS['WWW']}include/js/dyfrom.js" type="text/javascript"></script>
<script type="text/javascript">
setTimeout('newvercode()',1000);
function newvercode(){
	document.getElementById("vercodeimg").src="{$GLOBALS['WWW']}include/vercode.php?a="+Math.random();
}
function postform(){
	value=$("#pass1").val();
	if(!dyfrom_null(value)){
		alert('请输入新密码');return false;
	}
	value=$("#pass2").val();
	if(!dyfrom_null(value)||!(value==$("#pass1").val())){
		alert('两次密码输入不同，请修改');return false;
	}
{if($GLOBALS['G_DY']['vercode']==1)}
	value=$("#vercode").val();
	if(dyfrom_ajax("{$GLOBALS['WWW']}index.php?c=ajax&a=vercode","vercode="+value)=='false'){
		alert(value);
		alert('验证码输入错误');return false;
	}
{/if}
	$("#reset").submit();
}
function retrieve(){
	$("#retrieve_go").html('<strong style="color:#F00; font-size:14px;">正在发送找回密码邮件，请稍后...</strong>');
}
</script>
</head>

<body>
{include="head.html"}
<div class="wpm list">
  <div class="tab11"></div>
  <div class="tab1 tab1b main">
    <div class="l">
      <div class="columnc"><h2>会员中心</h2></div>
      <div class="columncl">
      <a href="?c=member&a=reg">会员注册</a>
      <a href="?c=member&a=login" class="c">会员登录</a>
      </div>
    </div>
    <div class="r">
    <div class="content">
       <div class="position">当前位置：找回密码</div>
       <div class="member_f">
{if($password)}
    <form action="index.php?c=member&a=reset_password&go=1" name="reset" id="reset" method="post">
    <input name="id" type="hidden" value="{$password['id']}" />
    <input name="token" type="hidden" value="{$password['token']}" />
	<dl><dt>用户名：</dt><dd>{$password['user']}</dd><dd class="m"></dd></dl>
	<dl><dt>新密码：</dt><dd><input type="password" name="pass1" id="pass1" class="inp" style="width:150px;"/></dd><dd class="m"></dd></dl>
	<dl><dt>确认密码：</dt><dd><input type="password" name="pass2" id="pass2" class="inp" style="width:150px;"/></dd><dd class="m"></dd></dl>
    {if($GLOBALS['G_DY']['vercode']==1)}
	<dl><dt>验证码：</dt><dd><input type="text" name="vercode" id="vercode" class="inp" style="width:80px;"/></dd><dd><img src="{$GLOBALS['WWW']}include/vercode.php" id="vercodeimg" width="60" height="25" style="cursor:pointer;" onclick="newvercode();" /></dd></dl>
    {/if}
    <dl style="border:0;"><dt>&nbsp;</dt><dd><input type="button" value="重置密码" class="btnbig" onclick="postform();" /></dd></dl>
    </form>

{else}

    <form action="index.php?c=member&a=retrieve_password&go=1" method="post" onsubmit="return retrieve()">
	<dl><dt>邮箱：</dt><dd><input type="text" name="email" class="inp" style="width:150px;"/></dd><dd class="m">输入您注册信息中的email地址</dd></dl>
	<dl><dt>用户名：</dt><dd><input type="text" name="user" class="inp" style="width:150px;"/></dd><dd class="m">可不填写</dd></dl>
    {if($GLOBALS['G_DY']['vercode']==1)}
	<dl><dt>验证码：</dt><dd><input type="text" name="vercode" class="inp" style="width:80px;"/></dd><dd><img src="{$GLOBALS['WWW']}include/vercode.php" id="vercodeimg" width="60" height="25" style="cursor:pointer;" onclick="newvercode();" /></dd></dl>
    {/if}
    <dl style="border:0;"><dt>&nbsp;</dt><dd id="retrieve_go"><input type="submit" value="找回密码" class="btnbig" /></dd></dl>
    </form>
{/if}
       </div>
    </div>
    </div>
  </div>
  <div class="tab12 mban"></div>
</div>
{include="bottom.html"}
</body>
</html>
